#!/bin/bash

KEXT="Sinetek-rtsx.kext"

# call copy first
./c "$@"

# sync filesystem before loading the kext (hopefully this will help prevent
# filesystem corruption in case the kext crashes...).
sync

# if failure, execute kextutil -l to see the error message
sudo kextload "$KEXT" ||
	sudo kextutil -l "$KEXT"
